package com.zygh.lz.controller;

import com.zygh.lz.entity.duty.TaskSchedule;
import com.zygh.lz.service.TaskScheduleService;
import com.zygh.lz.stapprove.SysPcLog;
import com.zygh.lz.vo.ResultBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author lee
 */
@RestController
@RequestMapping("/task/schedule")
@Api(tags = "推送任务id")
public class TaskScheduleController {
    @Resource
    private TaskScheduleService taskScheduleService;
    @GetMapping("/find")
    @ApiOperation("分页查询")
    public ResultBean find(TaskSchedule taskSchedule){

        return taskScheduleService.find(taskSchedule);
    }

    @PostMapping("/add")
    @ApiOperation("新增")
    //@SysPcLog(module = "新增推送任务",operation = "新增")
    public ResultBean add(@RequestBody TaskSchedule taskSchedule){
        return taskScheduleService.add(taskSchedule);
    }

    @PostMapping("/update")
    @ApiOperation("修改")
    //@SysPcLog(module = "修改推送任务",operation = "修改")
    public ResultBean update(@RequestBody TaskSchedule taskSchedule){
        return taskScheduleService.update(taskSchedule);
    }

    @PostMapping("/delete")
    @ApiOperation("删除")
    //@SysPcLog(module = "删除推送任务",operation = "删除")
    public ResultBean delete(@RequestBody TaskSchedule taskSchedule){
        return taskScheduleService.delete(taskSchedule);
    }
}
